<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Search" Title="Search - gatsb" %>
<%@ Register Src="~/UserTileControl.ascx" TagPrefix="decavuc" TagName="UserTile" %>
<%@ Register Src="~/LocationTileControl.ascx" TagPrefix="decavuc" TagName="LocationTile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeaderPlaceholder" Runat="Server">
    <link rel="stylesheet" type="text/css" href="Styles/SearchStyle.css" />
    <style type="text/css">
        .SearchTextBox
        {
            width:400px;
        }
        
        #SearchBox
        {
            margin-left:200px;
            margin-right:200px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageBodyPlaceholder" Runat="Server">

    <div id="SearchBox">
        <table cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td valign="top">
                        <asp:TextBox runat="server" ID="searchTextBoxBox" CssClass="SearchTextBox" /><br />
                        <span style="font-style:italic;color:#666666;">
                            Search for people (ex: Jocelyn Chambers), venues (ex: Buddha bar),<br />
                            addresses (ex: 72 Orchard St.), or intersections (ex: 23rd and Park).
                        </span>
                    </td>
                    <td valign="top">
                        <div style="margin-left:15px;">
                            <asp:Button runat="server" ID="searchButton" Text="Search"
                                UseSubmitBehavior="true" OnClick="Search_Click" />    
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    
    <div id="SearchResultsPlaces" runat="server" visible="false">
        <h3>Places</h3>
        <div id="noPlacesFoundMessage" class="StatusRibbon" runat="server" visible="false">No places found when searching for "<%= SearchQuery %>."</div>

        <asp:Repeater runat="server" ID="placesResultsList">
            <HeaderTemplate>
                <ul class="SearchResults">
            </HeaderTemplate>
            <ItemTemplate>
                <li><decavuc:LocationTile runat="server" Location="<%# Container.DataItem %>"/></li>
            </ItemTemplate>            
            <FooterTemplate>
                </ul>
            </FooterTemplate>
         </asp:Repeater>
    </div>
    
    
    <div id="SearchResultsPeople" runat="server" visible="false">
        <h3>People</h3>
        <div id="noPeopleFoundMessage" class="StatusRibbon" runat="server" visible="false">No people found when searching for "<%= SearchQuery %>."</div>
        
        <asp:Repeater runat="server" ID="peopleResultsList">
            <HeaderTemplate>
                <ul class="SearchResults">
            </HeaderTemplate>
            <ItemTemplate>
                <li><decavuc:UserTile runat="server" User="<%# Container.DataItem %>" /></li>
            </ItemTemplate>            
            <FooterTemplate>
                </ul>
            </FooterTemplate>
        </asp:Repeater>
    </div>
    
    <div id="NoSearchResultsFound" runat="server" visible="false" style="margin-top:50px;">
        <div class="ErrorRibbon">
            Nothing was found matching your search criteria.
        </div>
        
        <dl>
            <dt>Finding a Person</dt>
            <dd>
                When searching for a person, use the persons full name, first name, last name, email address
                or mobile telephone number.
            </dd>
        
            <dt>Finding an Address</dt>
            <dd>
                Try giving an address in a standard format, for example <b>"42 E 23rd St."</b>
            </dd>
            
            <dt>Finding a Venue</dt>
            <dd>
                Use the venue's full name.  If you can't find it, it may not be listed properly.
            </dd>
        </dl>
        <div>
            If you can't find a place you're looking for, <a href="CreateLocation.aspx">create the location</a>
            so that you can use it with Gatsb!
        </div>
    </div>
</asp:Content>

